export default {
  pages: (function () {
    let pages = ['pages/login/auth', 'pages/index/index']
    if (process.env.NODE_ENV === 'development') {
      // eslint-disable-next-line prefer-const
      let firstKeyword = 'demo/index'

      // firstKeyword = 'ListenEvaluationRecord'

      // 开发环境增加demo页面，并放到最前
      pages = [
        'pages/demo/DemoLot/DemoLot',
        'pages/demo/index',
        // 'pages/demo/Waterfall/WaterfallDemo',
        // 'pages/demo/Recorder/RecorderDemo',
        'pages/demo/DrawPage/DrawPage',
        'pages/demo/DrawPage/DrawPageDemo',
        // 'pages/demo/VoicePlay/VoicePlayDemo',
        // 'pages/demo/OnClickOutside/OnClickOutside',
        // 'pages/demo/canvas/canvas',
      ].concat(pages)

      pages.some((path, index) => {
        if (path.includes(firstKeyword)) {
          pages.unshift(pages.splice(index, 1)[0])
          return true
        }
      })
    }
    return pages
  })(),

  subpackages: [
    {
      root: 'packageECharts',
      pages: ['pages/ECharts/ECharts'],
    },
  ],
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'taro template',
    navigationBarTextStyle: 'black',
  },
  // tabBar: {
  //   // "custom": true,
  //   color: '#666',
  //   selectedColor: '#496af2',
  //   borderStyle: 'black',
  //   backgroundColor: '#fff',
  //   list: [
  //     {
  //       pagePath: 'pages/index/index',
  //       iconPath: 'static/img/home.png',
  //       selectedIconPath: 'static/img/homeSelect.png',
  //       text: '首页',
  //     },
  //   ],
  // },
}
